package com.plug.service;

import com.plug.entity.PlugBackupRecord;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by admin on 2017/1/4.
 */
@Repository
public interface IPlugBackupRecordService {
    //新增备份记录
    int saveBackupRecord(PlugBackupRecord record );

    /**
     * 批量新增日志记录
     * @param plugBackupRecordList
     * @return
     */
    int saveBatch(List<PlugBackupRecord> plugBackupRecordList);
    //查找备份记录
    List<Map<String, Object>> findByPageNum(int offset,int limit,String actionType);
    //按条件查询
    /**
     * 分页查询数据源
     * @param offset
     * @param limit
     * @return
     */
    List<Map<String, Object>> pages(Integer offset,Integer limit,String actionType);
//    查询记录总数
    int findTotal(String actionType);

    /**
     *根据备份任务id查询和间隔时间查询
     * @param minute
     * @param plugContrastId
     * @return PlugBackupRecord
     */
    PlugBackupRecord selectByBackupsAndMinuteInfo(Integer minute,Integer plugContrastId);

    List<Map<String, Object>> findActionType();

    /**
     *
     * @param actionType
     * @return
     */
    List<Map<String,Object>> selectByActionType(String actionType);

    List<Map<String,Object>> test(Map<String,Object> map);
}
